New Codes For Magnet Simulator 2